package org.jackysoft.mapper;

import java.util.Collection;

import org.apache.ibatis.annotations.Param;
import org.jackysoft.data.MapperDataProvider;
import org.jackysoft.entity.SecurityRole;

public interface SecurityRoleMapper extends MapperDataProvider<SecurityRole> {

	Collection<SecurityRole> findByTreeNode(@Param("treeId")String tree);
	Collection<SecurityRole> findByUser(@Param("user") String user);
	Collection<SecurityRole> findEnabledByUser(@Param("user")String user);
	void appendUser(@Param("role")String name,@Param("user")String user);
	
	int hasRole(@Param("user")String user,@Param("role")String role);
	
	void enabled(@Param("name")String role);
}
